<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">
            <!-- <ob_link><a class="btn" href="{:url('userAdd')}"><i class="fa fa-plus"></i> 新 增</a></ob_link> -->
            &nbsp;
            <ob_link><a class="btn export" url="{:url('exportCompanyList')}"><i class="fa fa-download"></i> 导 出</a></ob_link>
        </div>
        
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">                  
                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="{:input('search_data')}" placeholder="支持昵称|用户名|公司名">
					<select name="stat" class="pull-right form-control" style="width:120px">
						<option value='9'>全部</option>
						<option value='0'>待审核</option>
						<option value='1'>已通过</option>
					</select>
                    <div class="input-group-btn">
                      <button type="button" id="search"  url="{:url('companylist')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>
                </div>
           </div>
        </div>
    </div>
    
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>用户名</th>
          <th>公司名称</th>
		  <th>公司简介</th>
          <th>统一编码</th>
		  <th>营业执照</th>
		  <th>类型</th>
		  <th>规模</th>
          <th>法人</th>
		  <th>联系人</th>
		  <th>时间</th>
		  <th>公司图列</th>
          <th>状态</th>
          <th>操作</th>
          <th>删除</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>{$vo.username}<br/>{$vo.name}</td>
                  <td>{$vo.company}<br/>{$vo.title}</td>
				  <td class="tmd{$vo.company_id}"><a onclick="chakan({$vo.company_id},'{$vo.cont}')">查看</a></td>
                  <td>{$vo.code}</td>
				  <td><a Onclick="imgck('{$vo.img}')" target="_blank" data-lightbox="gallery" data-title="{$vo.company}" > <img src="{$vo.img}"  width="40"/></a></td>
                  <td>{$vo.typeName}</td>
				  <td>{$vo.numName}</td>
				  <td>{$vo.person}</td>
                  <td>{$vo.persons}<br/>{$vo.phone}</td>
				  <td>{$vo.create_time}</td>
				  <td>
					{volist name='vo.imgs' id='v'}
						<a Onclick="imgck('{$v}')"  target="_blank" data-lightbox="gallery" data-title="{$v}" > <img src="{$v}"  width="40"/></a>
					{/volist}
				  </td>
				  <td>
					{if $vo.stat == 0}<span style="color:red">待审核<span>{/if}{if $vo.stat == 1}已通过{/if}  
                  </td>
                  <td>
                      <ob_link><a href="{:url('companyEdit', array('company_id' => $vo['company_id']))}" class="btn"><i class="fa fa-edit"></i> 编 辑</a></ob_link>
                      &nbsp;&nbsp;&nbsp;
						<ob_link><a class="btn ajax-get" href="{:url('setStat', array('company_id' => $vo['company_id'], 'stat' => (int)!$vo['stat'],'user_id' => $vo['user_id']))}">{if $vo.stat==0}<i class="fa fa-edit"></i>通过{else/}<i class="fa fa-trash-o"></i>撤销{/if}</a>
						</ob_link>
                  </td>
                <td>
                    {if $vo.stat == 0}<ob_link><a class="btn confirm ajax-get" href="{:url('user/delCompany', array('company_id' => $vo['company_id']))}"><i class="fa fa-trash-o"></i> 删 除</a>{/if}</ob_link>
                </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
  </div>

  <div class="box-footer clearfix text-center">
      {$list->render()}
  </div>

</div>
<script>	
    //导出功能
    $(".export").click(function(){  	
       window.location.href = searchFormUrl($(".export"));
    });
    function chakan(id,str){
        layer.tips(str, '.tmd'+id);
    }
    function tuisong(id){
        if(confirm('你确定向所有app用户推送此消息？')){
            $.post("{:url('user/jpush')}",{user_id:id},function(data){
                if(data.error == 0){
                    layer.msg(data.html, {icon: 1});
                    location.reload();
                }else{
                    layer.alert(data.html, {icon: 2});
                }
            },'json')
        }
    }
</script>